package com.java1412.utils;

import java.util.List;

/**
 * 分页的工具类
 *
 * @author java1412
 * @since 2023-08-09 09:28:19
 */
public class PageUtil<T> {
    private Integer currentPage;// 当前页
    private Integer pageSize;// 页大小
    private Integer total; // 总数据量
    private List<T> data;

    public PageUtil() {
    }

    public PageUtil(Integer currentPage, Integer pageSize, Integer total, List<T> data) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.total = total;
        this.data = data;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
